import layout from '@/layout/index.vue'

// 没有权限要求的基页，所有用户都可以进去
const commonRouter = [
  {
    path: '/redirect',
    component: layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path(.*)',
        component: () => import('@/views/redirect/index')
      },
      {
        path: '/welcome',
        name: 'welcome',
        component: () => import('@v/welcome'),
        meta: {
          title: '欢迎页',
          icon: '登录日志'
        }
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@v/login'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@v/error-page/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import('@v/error-page/401'),
    hidden: true
  },
  {
    path: '/',
    redirect: '/welcome',
    component: layout,
    hidden: true
  }
]

export default commonRouter
